﻿using Ycg.Utility;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Ycg.Test
{


    /// <summary>
    ///This is a test class for StringHelperTest and is intended
    ///to contain all StringHelperTest Unit Tests
    ///</summary>
    [TestClass()]
    public class StringHelperTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for ConvertChineseToSpell
        ///</summary>
        [TestMethod()]
        public void ConvertChineseToSpellTest()
        {
            string actual = ChineseHelper.ConvertChineseToSpell("你好哦，我爱你1312321大大爱迪生2321 3", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell("长城", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell("中国一重", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell("似乎", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell("231312312312", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell("", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell(null, true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToSpell("似乎321321阿德撒的舞曲第五期带我去但顽强的武器", true);
            Console.WriteLine(actual);
        }

        /// <summary>
        ///A test for ConvertChineseToFirstSpell
        ///</summary>
        [TestMethod()]
        public void ConvertChineseToFirstSpellTest()
        {
            string actual = ChineseHelper.ConvertChineseToFirstSpell("你好哦，我爱你1312321大大爱迪生2321 321321杨曹贵", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("长城", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("中国一重", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("似乎", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("似乎", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("123", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("", true);
            Console.WriteLine(actual);

            actual = ChineseHelper.ConvertChineseToFirstSpell("null", true);
            Console.WriteLine(actual);
        }
    }
}
